package com.mmy.dao.permission;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.mmy.domain.permissionmenu.VConstMenu;

public interface VConstMenuRepository extends JpaRepository<VConstMenu, Integer> {

	@Query(value = "select *  from vConstMenu where ((:strMenuName = \"\" or cMenuName like %:strMenuName%) or (:strMenuName = \"\" or cUpMenuName like %:strMenuName%))  and (iState = 1 or iState = 3) order by iID limit :iTempPageNo,:iPageSize", nativeQuery = true)
	List<VConstMenu> findFrontByMenuNameAndChild(@Param("strMenuName") String strMenuName,
			@Param("iTempPageNo") int iTempPageNo, @Param("iPageSize") int iPageSize);
}
